﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace BanquetPortion.Models
{
    /// <summary>
    /// 份子人
    /// </summary>
    [Table("banquetGiftPeople")]
    public class BanquetGiftPeople
    {
        /// <summary>
        /// 数据 ID
        /// </summary>
        [Key]
        [Display(Name = "数据 ID")]
        public int Id { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        [Display(Name = "创建人")]
        public int CreatedBy { get; set; }
        /// <summary>
        /// 创建日期
        /// </summary>
        [Display(Name = "创建日期")]
        public DateTime CreatedDataTime { get; set; } = DateTime.UtcNow.AddHours(8);
        /// <summary>
        /// 份子人姓名
        /// </summary>
        [Display(Name ="份子人姓名")]
        [Required (ErrorMessage ="姓名是必须的")]
        [MaxLength(20,ErrorMessage ="姓名的最大长度为 50 个字")]
        public string GiftPeopleName { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        [Display(Name = "性别")]
        public int Gender { get; set; }
        /// <summary>
        /// 居住地址
        /// </summary>
        [Display(Name = "居住地址")]
        [MaxLength (100,ErrorMessage ="居住地址的最大长度为 100 个字")]
        public string Addreass { get; set; }
        /// <summary>
        /// 数据字典的描述
        /// </summary>
        [Display(Name = "数据字典的描述")]
        [MaxLength (200,ErrorMessage ="描述的最大长度为 200 个字")]
        public string Description { get; set; }
    }
}
